<fieldset style="width:1065px;border:solid 1px #A4BED4;margin-bottom:10px;margin-top:10px;margin-left:-1px;position:relative;">
    <legend><strong style="font-size: 18px;">个人资料管理</strong></legend>
    <form action="/oa/profile" method="post" enctype="multipart/form-data" id="profileSubmit">
        <div>
            <input type="hidden" name="id" id="ClickRowID" value="<?=$staff['cid']?>">
            <table style="width:100%;table-layout:fixed;">
                <tbody>
                <tr style="margin-bottom: 10px;">
                    <td style="width:100px;">所属机构：</td>
                    <td style="width:260px;">
                        <strong><?=$staff['agency']?></strong>
                    </td>
                </tr>
                <tr>
                    <td style="width:100px;">职位：</td>
                    <td style="width:260px;">
                        <strong><?=$staff['position']?></strong>
                    </td>
                </tr>
                <tr>
                    <td style="width:100px;">姓名：</td>
                    <td style="width:260px;">
                        <input name="name" style="width: 250px;" value="<?=$staff['name']?>" class="text required" id="title" required="true">
                    </td>
                </tr>
                <tr>
                    <td style="width:100px;">性别：</td>
                    <td style="width:260px;">
                        <input type="radio" name="sex" <?=$staff['sex'] == '未知' ? 'checked="checked"' : ''?> value="未知">未知&nbsp;
                        <input type="radio" name="sex" <?=$staff['sex'] == '男' ? 'checked="checked"' : ''?> value="男">男&nbsp;
                        <input type="radio" name="sex" <?=$staff['sex'] == '女' ? 'checked="checked"' : ''?> value="女">女&nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width:100px;">年龄：</td>
                    <td style="width:260px;">
                        <input name="age" style="width: 50px;" value="<?=$staff['age']?>" class="text required" id="age" >
                    </td>
                </tr>

                <tr>
                    <td style="width:100px;">出生日期：</td>
                    <td style="width:260px;">
                        <input name="birthday" style="width: 150px;" value="<?=$staff['birthday']?>" class="text required date" id="birthday" >
                    </td>
                </tr>

                <tr>
                    <td style="width:100px;">手机号：</td>
                    <td style="width:260px;">
                        <input name="mobile_phone" style="width: 250px;" value="<?=$staff['mobile_phone']?>" class="text required" id="mobile_phone" required="true">
                    </td>
                </tr>

                <tr>
                    <td style="width:100px;">座机电话：</td>
                    <td style="width:260px;">
                        <input name="tel" style="width: 250px;" class="text required" id="tel" value="<?=$staff['tel']?>">
                    </td>
                </tr>

                <tr>
                    <td style="width:100px;">头像：</td>
                    <td style="width:260px;">
                        <?php if($staff['avatar_url']){?><img src="<?=$staff['avatar_url']?>" height="200" width="200"><?php }?>
                        <input name="avatar_url" type="file"  class="text required" id="avatar_url" >
                    </td>
                </tr>
                <tr>
                    <td>个人介绍：</td>
                    <td colspan="3">
                        <textarea name="remark" id="content" style="width:442px;padding:0; line-height0px;height:150px;"><?=$staff['remark']?></textarea>
                    </td>
                </tr>
                <tr></tr>
                <tr>
                    <td>&nbsp;</td>
                    <td >
                        <a href="javascript:void(0)" class="button" id="SaveButton">
                            <span class="button-text">保存</span></a>&nbsp;&nbsp;
                        <a href="javascript:void(0)" class="button" id="ResetButton">
                            <span class="button-text">重置</span>
                        </a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </form>
</fieldset>

<script type="text/javascript">
    $(document).ready(function(){

        // 变更提交
        $('a#SaveButton').click(function(){
            // 数据检测
            if ($("#name").val() == '' || $("#mobile_phone").val() == '') {
                parent.$.dooDialog.alert('姓名和手机号必须填写！');
                return false;
            } else {
                $("#profileSubmit").submit();
            }
        });

        // 重置
        $('a#ResetButton').click(function(){
            $('input[name="title"]').val('');
            $('input[name="content"]').val('');
            $('input[name="mobile_phone"]').val('');
            $('input[name="tel"]').val('');
        });
    });
</script>